package hee;

import java.util.Scanner;
        //변수선언
        //2생년월일,나이계산
        //3결과출력
public class P11 {

	public static void main(String[] args) {
		// 1변수선언
		int birthYear;
		int currentYear;
		int age;
		Scanner sc = null;  //클래스변수를 초기화할때는 null 사용, 중요!! sc = null
		
		// 2생년월일,나이계산
		sc = new Scanner(System.in);
		System.out.println("생년을 입력하세요");
		birthYear = sc.nextInt();
		System.out.println("현제년도을 입력하세요");
		currentYear = sc.nextInt();  //입력값 받기위해 표현
		
		age = currentYear - birthYear + 1;
		
		// 3결과출력
		
		System.out.println( birthYear );
		System.out.println( currentYear );
		System.out.println( age );
		sc.close();
		
		
		

	}
}
